package com.classtest.test4;

public class Book {
    private String book;//书名
    private String name;//作者
    private String publisher;//出版社
    private double price;//价格

    public Book() {
    }

    public Book(String book, String name, String publisher, double price) {
        this.book = book;
        this.name = name;
        this.publisher = publisher;
        this.price = price;
    }

    public String getBook() {
        return book;
    }

    public void setBook(String book) {
        this.book = book;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPublisher() {
        return publisher;
    }

    public void setPublisher(String publisher) {
        this.publisher = publisher;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public void show() {
        System.out.println("书名：" + book);
        System.out.println("作者：" + name);
        System.out.println("出版社：" + publisher);
        System.out.println("价格：" + price+"元");
    }
}
